package com.sys.controller.customer;

import com.alibaba.fastjson2.JSON;
import com.sys.common.core.controller.BaseController;
import com.sys.common.core.domain.AjaxResult;
import com.sys.common.utils.SecurityUtils;
import com.sys.customer.domain.SysUserSpecialty;
import com.sys.customer.service.SysUserSpecialtyService;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author LGY
 * Create by 2025/2/20 16:21
 */
@Tag(name = "用户特长")
@RestController
@RequestMapping("/customer/specialty")
public class SysUserSpecialtyController extends BaseController {

    @Autowired
    private SysUserSpecialtyService sysUserSpecialtyService;

    @PostMapping("/save")
    public AjaxResult saveUserSpecialty(@RequestBody List<SysUserSpecialty> userSpecialtyList) {
        sysUserSpecialtyService.saveUserSpecialty(userSpecialtyList, SecurityUtils.getUserId());
        return AjaxResult.success();
    }
}
